﻿using CodeApi.Context;
using CodeApi.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CodeApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class GetKindSortController : ControllerBase
    {
        public  ArticleKindContext context { get; set; }

        public GetKindSortController(ArticleKindContext context)
        {
            this.context = context;
        }

        [HttpGet]
        public async Task<ActionResult<List<ArticleKindModel>>> GetArticleKind()
        {
            return await this.context.kindSort.ToListAsync();
        }



       
    }
}
